package com.ltmonitor.jt808.protocol;

public class PostitionAdditional_AlarmEventId implements
		IPositionAdditionalItem {

	public final int getAdditionalId() {
		return 0x04;
	}

	public final byte getAdditionalLength() {
		return 0x02;
	}

	/**
	 * 需要人工确认报警事件的ID，WORD，从1开始计数
	 */

	private short alarmEventId;

	public final short getAlarmEventId() {
		return alarmEventId;
	}

	public final void setAlarmEventId(short value) {
		alarmEventId = value;
	}

	public final byte[] WriteToBytes() {
		return BitConverter.GetBytes(getAlarmEventId());
	}

	public final void ReadFromBytes(byte[] bytes) {
		setAlarmEventId((short) BitConverter.ToUInt16(bytes, 0));
	}
}